<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        
    </div>
</body>
<script src="https://unpkg.com/vue@next"></script>
<script>
    const aa={
        data(){
            return{
                counter:0
            }
        },
    methods:{
        btnClick(){
            console.log(this.counter++,'-->',this)
        },
        btnClick1:()=>{
            console.log(this.counter++,'-->',this)
        }
        },
        template:`<div>{{counter}}</div>
        <button @click="btnClick">按钮</button>
        <button @click="btnClick1">按钮1</button>
        `
    }
    Vue.createApp(aa).mount("#app")
</script>
</html>